﻿namespace EFS.RC.SupervisorCentral.Common.Config.Sections.Domain
{
	/// Reads Main section
	public class Main
	{
		/// Static constructor
		static Main()
		{
			Instance = new Main();
		}

		/// Private constructor
		private Main()
		{
			// load config
			LoadConfig();
		}

		#region Properties
		/// Property Name: Get, Set
		public System.String Name { get; private set; }

		/// Property Instance: Get, Set
		public static Main Instance { get; private set; }
		#endregion

		/// Loads the configuration
		private void LoadConfig()
		{
			// get section
			System.Collections.Specialized.NameValueCollection nvc =
				(System.Collections.Specialized.NameValueCollection)System.Configuration.ConfigurationManager.GetSection("Domain/main");

			// test section
			if (null == nvc)
			{
				return;
			}

			// read values
			Name = nvc["Name"];
		}
	}

}